package com.example.examsystem2.service.serviceImpl;


import com.example.examsystem2.entity.Subject;
import com.example.examsystem2.mapper.SubjectMapper;
import com.example.examsystem2.service.SubjectService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SubjectServiceImpl implements SubjectService {
    @Resource
    private SubjectMapper subjectMapper;


    public void setSubjectMapper(SubjectMapper subjectMapper) {
        this.subjectMapper=subjectMapper;
    }

    @Override
    public List<Subject> get_all_subject() {
        return subjectMapper.get_all_subject();
    }

    @Override
    public int del_subject_by_s_id(int s_id) {
        return subjectMapper.del_subject_by_s_id(s_id);
    }

    @Override
    public int add_subject(Subject subject) {
        return subjectMapper.add_subject(subject);
    }


}
